<?php
namespace app\admin\controller;

use think\Request;
use app\admin\logic\SystemLogic;

class System extends Base{
	private $systemLogic;

	/**
	 * System constructor.
	 *
	 * @param Request|null $request
	 */
	public function __construct( Request $request = null ) {
		parent::__construct( $request );
		$this->systemLogic=new SystemLogic();
	}

	// 登陆页面
	public function index(){
		return $this->fetch();
	}
	// 主框架页面
	public function main(){
		return $this->fetch();
	}

	function addConfig(){
		return $this->fetch();
	}

	function doAddConfig(){
		echo '1';
	}

	function indexBackup(){
		$domain=request()->domain();
		$this->assign('domain',$domain);
		// p($domain);
		$files=$this->systemLogic->backup();
		$this->assign('files',$files);
		return $this->fetch();
	}
	function doBackup(){
		$list=$this->systemLogic->doBackup();
		return $list;
	}
}
